package cn.senjoeson.triper.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class DayFragmentAdapter extends FragmentStatePagerAdapter {

    public DayFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    private List<Fragment> mFragments;

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments == null ? 0 : mFragments.size();
    }

    public void setFragments(ArrayList<Fragment> fragments) {
        this.mFragments = fragments;
    }


}